//
//  LeveyPopListView.h
//  LeveyPopListViewDemo
//
//  Created by Levey on 2/21/12.
//  Copyright (c) 2012 Levey. All rights reserved.
//


@protocol LeveyPopListViewDelegate;
@interface LeveyPopListView : UIView <UITableViewDataSource, UITableViewDelegate>
{
    UITableView *_tableView;
    NSString *_title;
    NSArray *_options;
    int fullHeight;
    UITableView *_tableViewType;
    NSArray *_optionsType;
}

@property (nonatomic, weak) id<LeveyPopListViewDelegate> delegate;
@property (strong,nonatomic) NSString  *name;
@property (strong,nonatomic) NSString  *typeName;

@property (assign) int  fullHeight;
//
@property (assign) int  selectedTypeIndex;
@property (assign) int  selectedIndex;
@property (assign) int  clickedType;
@property (strong,nonatomic) NSString  *listName;

@property (nonatomic,strong) UIView *back;
// The options is a NSArray, contain some NSDictionaries, the NSDictionary contain 2 keys, one is "img", another is "text".
- (id)initWithTitle:(NSString *)aTitle options:(NSArray *)aOptions;
- (id)initWithTitle:(NSString *)aTitle options:(NSArray *)aOptions fullHeight:(int)height;

- (id)initWithTitle:(NSString *)aTitle options:(NSArray *)aOptions types:(NSArray *)aTypes;
- (id)initWithTitle:(NSString *)aTitle options:(NSArray *)aOptions types:(NSArray *)aTypes fullHeight:(int)height;

//- (id)initWithTitle:(NSString *)aTitle options:(NSArray *)aOptions names:(NSString *)aName;
// If animated is YES, PopListView will be appeared with FadeIn effect.
- (void)showInView:(UIView *)aView animated:(BOOL)animated;
@end

@protocol LeveyPopListViewDelegate <NSObject>
- (void)leveyPopListView:(LeveyPopListView *)popListView didSelectedIndex:(NSInteger)anIndex options:(NSArray *)_options didSelectedTypeIndex:(NSInteger) anTypeIndex;
- (void)leveyPopListViewDidCancel;
@end